/*
 * @Author: zhengzhuang
 * @Date: 2020-07-27 17:41:01
 * @LastEditors: zhengzhuang
 * @LastEditTime: 2020-08-29 11:47:45
 * @Description: 司机信息model
 * @FilePath: /C20Driver/lib/model/driver_information_model.dart
 */
class DriverInformationModel {
  String userId; // ID
  String driverMpdify; // 驾驶证与身份证信息是否可以修改状态, 0000可修改 0010不可修改
  String vehicleMpdify; // 车主车辆信息是否可以修改状态, 0000可修改 0010不可修改
  String qualificationMpdify; // 资格证信息是否可以修改, 0000可修改 0010不可修改
  String driverName; // 司机姓名
  String headimgurl; // 头像
  String driverPhone; // 司机手机
  String userTariffCode; // 用户资费
  String idNo; // 身份证号
  String driverGender; // 司机性别
  String driverBirthday; // 司机出生日期
  String driverNationdriverNation; // 民族
  String driverMaritalStatus; // 婚姻状态
  String workingStatus; // 接单状态(出车状态) 0010:暂停 0020:出车(开始接单) 0030:收车  0040:行程中
  String authenticationStatus =
      '0000'; // 车主认证状态 0000:认证成功 0010:认证中 0020:审核失败,可重新提交审核 0030审核失败,不可重复提交审核 0090 未认证车主
  String frontIdCard; // 身份证正面
  String backIdCard; // 身份证背面
  String driverType; // 驾驶证类型
  String frontDriverLicense; // 驾驶证正面
  String backDriverLicense; // 驾驶证背面
  String frontDrivingLicense; // 行驶证正面
  String backDrivingLicense; // 行驶证背面
  String termValidity; // 驾驶证有效期
  String dateTimeCertification; // 驾驶证初领证日期
  String vehicleNumberPlate; // 车辆牌号
  String brandModels; // 汽车品牌
  String vehicleColor; // 汽车颜色
  List<String> carImageList; // 车辆照片
  String employment; // 网约车驾驶证
  String operate; // 车辆运行证
  bool qualificationCertificateState; // 网约车驾驶证与车辆运行证上传状态
  bool idCardUploadState; // 身份证与驾驶证上传状态
  bool drivingUploadState; // 行驶证上传状态
  String vin; // 车辆识别码
  String engineid; // 发动机号
  String distance; // 行驶里程
  String certifyDate; // 上牌时间
  String carAddress; // 车辆城市

  DriverInformationModel(
      {this.userId,
      this.driverMpdify,
      this.vehicleMpdify,
      this.qualificationMpdify,
      this.driverName,
      this.headimgurl,
      this.driverPhone,
      this.userTariffCode,
      this.idNo,
      this.driverGender,
      this.driverBirthday,
      this.driverNationdriverNation,
      this.driverMaritalStatus,
      this.driverType,
      this.workingStatus,
      this.authenticationStatus,
      this.frontIdCard,
      this.backIdCard,
      this.frontDriverLicense,
      this.backDriverLicense,
      this.frontDrivingLicense,
      this.backDrivingLicense,
      this.termValidity,
      this.dateTimeCertification,
      this.vehicleNumberPlate,
      this.brandModels,
      this.vehicleColor,
      this.carImageList,
      this.employment,
      this.operate,
      this.qualificationCertificateState,
      this.idCardUploadState,
      this.drivingUploadState,
      this.vin,
      this.engineid,
      this.distance,
      this.certifyDate,
      this.carAddress});

  DriverInformationModel.fromJson(Map<String, dynamic> json) {
    userId = json['user_id'];
    driverMpdify = json['driver_mpdify'];
    vehicleMpdify = json['vehicle_mpdify'];
    qualificationMpdify = json['qualification_mpdify'];
    driverName = json['driver_name'];
    headimgurl = json['headimgurl'];
    driverPhone = json['driver_phone'];
    userTariffCode = json['user_tariff_code'];
    idNo = json['id_no'];
    driverGender = json['driver_gender'];
    driverBirthday = json['driver_birthday'];
    driverNationdriverNation = json['driver_nationdriver_nation'];
    driverMaritalStatus = json['driver_marital_status'];
    driverType = json['driver_type'];
    workingStatus = json['working_status'];
    authenticationStatus = json['authentication_status'];
    frontIdCard = json['front_id_card'];
    backIdCard = json['back_id_card'];
    frontDriverLicense = json['front_driver_license'];
    backDriverLicense = json['back_driver_license'];
    frontDrivingLicense = json['front_driving_license'];
    backDrivingLicense = json['back_driving_license'];
    termValidity = json['term_validity'];
    dateTimeCertification = json['date_time_certification'];
    vehicleNumberPlate = json['vehicle_number_plate'];
    brandModels = json['brand_models'];
    vehicleColor = json['vehicle_color'];
    carImageList = json['car_image_list'];
    employment = json['employment'];
    operate = json['operate'];
    qualificationCertificateState = json['qualification_certificate_state'];
    idCardUploadState = json['id_card_upload_state'];
    drivingUploadState = json['driving_upload_state'];
    vin = json['vin'];
    engineid = json['engineid'];
    distance = json['distance'];
    certifyDate = json['certify_date'];
    carAddress = json['car_address'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['user_id'] = this.userId;
    data['driver_mpdify'] = this.driverMpdify;
    data['vehicle_mpdify'] = this.vehicleMpdify;
    data['qualification_mpdify'] = this.qualificationMpdify;
    data['driver_name'] = this.driverName;
    data['headimgurl'] = this.headimgurl;
    data['driver_phone'] = this.driverPhone;
    data['user_tariff_code'] = this.userTariffCode;
    data['id_no'] = this.idNo;
    data['driver_gender'] = this.driverGender;
    data['driver_birthday'] = this.driverBirthday;
    data['driver_nationdriver_nation'] = this.driverNationdriverNation;
    data['driver_marital_status'] = this.driverMaritalStatus;
    data['driver_type'] = this.driverType;
    data['working_status'] = this.workingStatus;
    data['authentication_status'] = this.authenticationStatus;
    data['front_id_card'] = this.frontIdCard;
    data['back_id_card'] = this.backIdCard;
    data['front_driver_license'] = this.frontDriverLicense;
    data['back_driver_license'] = this.backDriverLicense;
    data['front_driving_license'] = this.frontDrivingLicense;
    data['back_driving_license'] = this.backDrivingLicense;
    data['term_validity'] = this.termValidity;
    data['date_time_certification'] = this.dateTimeCertification;
    data['vehicle_number_plate'] = this.vehicleNumberPlate;
    data['brand_models'] = this.brandModels;
    data['vehicle_color'] = this.vehicleColor;
    data['car_image_list'] = this.carImageList;
    data['employment'] = this.employment;
    data['operate'] = this.operate;
    data['qualification_certificate_state'] =
        this.qualificationCertificateState;
    data['id_card_upload_state'] = this.idCardUploadState;
    data['driving_upload_state'] = this.drivingUploadState;
    data['vin'] = this.vin;
    data['engineid'] = this.engineid;
    data['distance'] = this.distance;
    data['certify_date'] = this.certifyDate;
    data['car_address'] = this.carAddress;
    return data;
  }
}
